import logging.config

logging.config.fileConfig("logging.conf")
#获取logging.conf配置
logger = logging.getLogger("main")
#传入记录器，main是logging.conf中配置的logger
logger.debug("这是debug日志")
